<?php /*a:1:{s:57:"D:\workspace\admin\application\admin\view\user\index.html";i:1747109556;}*/ ?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title></title>
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all" />
    <style>
        .layui-form-item .layui-input-inline {
            width: 150px;
        }

        .layui-form-label {
            padding: 9px 5px;
            width: auto;
        }
    </style>
</head>

<body>
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                <div class="layui-form-item">
                    <div class="layui-inline ">
                        <label class="layui-form-label"><?php echo Lang('user_id'); ?></label>
                        <div class="layui-input-inline">
                            <input type="text" name="id" placeholder="<?php echo Lang('please_enter'); ?>" autocomplete="off"
                                class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-inline ">
                        <label class="layui-form-label"><?php echo Lang('nick_name'); ?></label>
                        <div class="layui-input-inline">
                            <input type="text" name="nick_name" placeholder="<?php echo Lang('please_enter'); ?>" autocomplete="off"
                                class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-inline ">
                        <label class="layui-form-label"><?php echo Lang('user_account'); ?></label>
                        <div class="layui-input-inline">
                            <input type="text" name="account" placeholder="<?php echo Lang('please_enter'); ?>" autocomplete="off"
                                class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-inline ">
                        <label class="layui-form-label"><?php echo Lang('user_mobile'); ?></label>
                        <div class="layui-input-inline">
                            <input type="text" name="mobile" placeholder="<?php echo Lang('please_enter'); ?>" autocomplete="off"
                                class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-inline ">
                        <label class="layui-form-label"><?php echo Lang('user_regip'); ?></label>
                        <div class="layui-input-inline">
                            <input type="text" name="regist_ip" placeholder="<?php echo Lang('please_enter'); ?>" autocomplete="off"
                                class="layui-input" />
                        </div>
                    </div>

                    <div class="layui-inline ">
                        <label class="layui-form-label"><?php echo Lang('user_status'); ?></label>
                        <div class="layui-input-inline">
                            <select name="online_status">
                                <option value=""><?php echo Lang('all'); ?></option>
                                <option value="1"><?php echo Lang('user_online_status'); ?></option>
                                <option value="2"><?php echo Lang('user_ban_status'); ?></option>
                                <option value="3"><?php echo Lang('user_mute_status'); ?></option>
                                <option value="40"><?php echo Lang('user_logoff_status'); ?></option>
                            </select>
                        </div>
                    </div>

                    <div class="layui-inline ">
                        <label class="layui-form-label"><?php echo Lang('user_regsource'); ?></label>
                        <div class="layui-input-inline">
                            <select name="regist_type">
                                <option value=""><?php echo Lang('all'); ?></option>
                                <option value="0"><?php echo Lang('admin_panel'); ?></option>
                                <option value="1">WEB</option>
                                <option value="2">IOS</option>
                                <option value="3">Android</option>
                                <option value="4">H5</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label"><?php echo Lang('user_channel_source'); ?></label>
                        <div class="layui-input-inline">
                            <select name="reg_source_id" id="regSourceId">
                                <option value=""><?php echo Lang('all'); ?></option>
                                <?php if(is_array($source_list) || $source_list instanceof \think\Collection || $source_list instanceof \think\Paginator): $k = 0; $__LIST__ = $source_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?>
                                <option <?php echo $source_key==$vo['source_key']?'selected':''?>
                                    value="<?php echo htmlentities($vo['source_key']); ?>"><?php echo htmlentities($vo['source_name']); ?>
                                </option>
                                <?php endforeach; endif; else: echo "" ;endif; ?>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label"><?php echo Lang('user_regtime'); ?></label>
                        <div class="layui-input-inline" style="width: 350px">
                            <input type="text" name="start_time" placeholder="<?php echo Lang('start_time'); ?>" autocomplete="off"
                                class="layui-input" style="width: 167px; display: inline" id="start_time_input" />
                            -
                            <input type="text" name="end_time" placeholder="<?php echo Lang('end_time'); ?>" autocomplete="off"
                                class="layui-input" style="width: 167px; display: inline" id="end_time_input" />
                        </div>
                    </div>


                    <div class="layui-inline ">
                        <label class="layui-form-label"><?php echo Lang('user_device_id'); ?></label>
                        <div class="layui-input-inline">
                            <input type="text" name="device_info" placeholder="<?php echo Lang('please_enter'); ?>"
                                autocomplete="off" class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-inline ">
                        <div class="layui-input-inline">
                            <button class="layui-btn layuiadmin-btn-userlist" lay-submit
                                lay-filter="LAY-user-front-search">
                                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                            </button>
                        </div>
                        <?php if(($role == '11') OR ($role == '21')): ?>
                        <div class="layui-input-inline">
                            <button class="layui-btn layui-btn-warm" lay-submit lay-filter="LAY-user-export"
                                data-type="">导出Excel</button>
                        </div>
                        <?php endif; ?>
                    </div>
                </div>
            </div>

            <div class="layui-card-body">
                <table id="LAY-user-manage" lay-filter="LAY-user-manage"></table>
                <script type="text/html" id="table-userlist-operation">
                <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="viewBehavior">
                    <i class="layui-icon layui-icon-cols"></i><?php echo Lang('check'); ?>
                </a>

                {{# if(d.device_info){ }}
                {{# if(d.device_status){ }}
                <a class="layui-btn layui-btn-xs layui-btn-xs" style="background-color: #02a7f0" lay-event="remove_device_blacklist">
                    <i class="layui-icon"></i>取消拉黑
                </a>
                {{# } else { }}
                <a class="layui-btn layui-btn-normal layui-btn-xs" style="background-color: #ec808d" lay-event="device_blacklist">
                    <i class="layui-icon"></i><?php echo Lang('user_device_blocked'); ?>
                </a>
                {{# } }}
                {{# } }}
                {{# if(d.room_admins){ }}
                <a class="layui-btn layui-btn-xs layui-btn-xs" lay-event="delAdmin">
                    <i class="layui-icon layui-icon-form"></i>已是房管
                </a>
                {{# } else { }}
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="setAdmin">
                    <i class="layui-icon layui-icon-form"></i><?php echo Lang('user_assign_moderator'); ?>
                </a>
                {{# } }} {{# if(d.bannerd_user){ }}
                <a class="layui-btn layui-btn-xs" lay-event="unbannerd">
                    <i class="layui-icon layui-icon-delete"></i><?php echo Lang('user_unban'); ?>
                </a>
                {{# } else { }}
                <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="bannerd">
                    <i class="layui-icon layui-icon-form"></i><?php echo Lang('user_mute_the_player'); ?>
                </a>
                {{# } }} {{# if(d.status != 0 && d.status != 5){ }}
                <a class="layui-btn layui-btn-xs" lay-event="del">
                    <i class="layui-icon layui-icon-edit"></i><?php echo Lang('user_unban'); ?>
                </a>
                {{# } else if(d.status == 0 ) { }}
                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">
                    <i class="layui-icon layui-icon-delete"></i><?php echo Lang('user_ban'); ?>
                </a>
                {{# } }}
                <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="edit">
                    <i class="layui-icon layui-icon-edit"></i><?php echo Lang('edit'); ?>
                </a>
            </script>
            </div>
        </div>
    </div>

    <script src="/layuiadmin/layui/layui.js"></script>
    <script src="/layuiadmin/layui/layui.hack.js"></script>
    <script>
        layui
            .config({
                base: "/layuiadmin/"
                , version: "<?php echo config('other.ui_version'); ?>"
            })
            .extend({
                index: "lib/index", //主入口模块
            })
            .use(["index", "user", "table", "laydate"], function () {
                var $ = layui.$,
                    form = layui.form,
                    table = layui.table,
                    laydate = layui.laydate;
                //执行一个laydate实例
                laydate.render({
                    elem: "#start_time_input",
                    type: "datetime",
                });
                laydate.render({
                    elem: "#end_time_input",
                    type: "datetime",
                });
                //监听搜索
                form.on("submit(LAY-user-front-search)", function (data) {
                    var field = data.field;

                    //执行重载
                    table.reload("LAY-user-manage", {
                        where: field,
                        page: {
                            curr: 1   //默认从第一页开始搜索
                        },
                    });
                });

                form.on('submit(LAY-user-export)', function (data) {
                    var field = data.field;
                    if (field.start_time && field.end_time && field.start_time > field.end_time) {
                        return layer.msg('开始时间不能大于结束时间', { icon: 5 })
                    }
                    location.href = '<?php echo url("user/export"); ?>?id=' + field.id + '&nick_name=' + field.nick_name + '&start_time=' + field.start_time + '&end_time=' + field.end_time + "&account=" + field.account + "&mobile=" + field.mobile + "&regist_ip=" + field.regist_ip + "&online_status=" + field.online_status + "&regist_type=" + field.regist_type + "&anchor_type=" + field.anchor_type + "&reg_source_id=" + field.reg_source_id + "&expert_type=" + field.expert_type + "&device_info=" + field.device_info;
                });
            });
    </script>
</body>

</html>